package ae.pcfc.cldos.online.common.strategy.transfer.providers;

import ae.pcfc.cldos.online.common.clddb.domain.AppMetaData;
import ae.pcfc.cldos.online.common.clddb.domain.VisitVisaCancel;
import ae.pcfc.cldos.online.common.strategy.transfer.BaseTransferStrategy;
import ae.pcfc.cldos.online.common.vo.TransferDataVO;
import ae.pcfc.cldos.online.net.service.vo.AppMetaDataVO;
import ae.pcfc.cldos.online.net.service.vo.ApplicationDataVO;
import ae.pcfc.cldos.online.net.service.vo.VisitVisaCancelVO;

/**
 * 
 * @author arosa
 *
 */
public class CancelVisitVisaTransferStrategyImpl extends BaseTransferStrategy {

	public String transferAppDateToOfflineSystem(TransferDataVO transferDataVO) {
		
		ApplicationDataVO applicationDataVO = new ApplicationDataVO();
		
		AppMetaData appMetaData = transferDataVO.getAppMetaData();
		VisitVisaCancel visitVisaCancel= appMetaData.getVisitVisaCancel();
		
		AppMetaDataVO appMetaDataVO = new AppMetaDataVO();
		mapper.map(appMetaData, appMetaDataVO);
		appMetaDataVO.setVisitorId(visitVisaCancel.getVvcEmployeeId());
		applicationDataVO.setAppMetaDataVO(appMetaDataVO);
		
		VisitVisaCancelVO visitVisaCancelVO = new VisitVisaCancelVO();
		mapper.map(visitVisaCancel, visitVisaCancelVO);
		applicationDataVO.setVisitVisaCancelVO(visitVisaCancelVO);
		
		applicationDataVO.setAttachmentVOList(getAttachmentsList(appMetaData));
		
		return netDataTransferService.transferCancelVisaData(applicationDataVO);
	}
}
